/**
* <p>Title: Vector.java</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2009</p>
* <p>Company: xunjie</p>
* @author shenhao
* @date 2009-12-15
* @version 1.0
*/
package cn.haona.test.classloader;

/**
 * <p>Title: Vector</p>
 * <p>Description: </p>
 * <p>Company: xunjie</p> 
 * @author    shenhao
 * @date       2009-12-15
 */
public class Vector extends java.util.Vector
{
	/*
	 * (non-Javadoc)
	 * <p>Title: replace</p>
	 * <p>Description: 替换</p>
	 * @param element
	 * @return
	 */
	boolean replace(Object element)
	{
		boolean isBack=false;
		int iIndex=-1;
		//如果有这个元素
		if((iIndex=indexOf(element))!=-1)
		{
			isBack=remove(element);
			//如果成功删除
			if(isBack)
			{
				this.insertElementAt(element, iIndex);
			}//if(如果成功删除)
		}//end if(如果有这个元素)
		
		return isBack;
	}
}
